package com.cyzy.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cyzy.mapper.CropMapper;
import com.cyzy.mapper.ServiceTypeMapper;
import com.cyzy.pojo.Crop;
import com.cyzy.pojo.ServiceType;
import com.cyzy.service.CropService;
import com.cyzy.service.ServiceTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CropServiceImpl extends ServiceImpl<CropMapper, Crop> implements CropService {
    @Autowired
    private CropMapper cropMapper;


    @Override
    public List<Crop> getList(Crop crop) {
        LambdaQueryWrapper<Crop> wrapper = new LambdaQueryWrapper<>();
//        wrapper.eq(Crop::getPlotId,crop.getPlotId());
        wrapper.last("limit 8");
        return cropMapper.selectList(wrapper);
    }

    @Override
    public List<Crop> getListByOrderNum(String orderNum) {
        return null;
    }


}
